import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

let defaltCity = '上海'

export default new Vuex.Store({
	state: {
		city: localStorage.city || '福州'
	},
	/* actions: {
		changeCity (ctx, city) {
			ctx.commit('changeCity', city)
		}
	}, */
	mutations: {
		changeCity (state, city) {
			state.city = city
			localStorage.city = city
		}
	}
})